package entry

import (
	"gitee.com/pkg/root"
	"gitee.com/pkg/utils/flag"
	"github.com/spf13/cobra"
)

var (
	dmCmd = &cobra.Command{
		Use:   "dm",
		Short: "dm go types from cue define",
		RunE: func(c *cobra.Command, args []string) error {
			flag.PrintFlags(c.Flags())

			return nil
		},
	}
)

func init() {
	root.AddCmd(dmCmd)
}

func AddCmd(cmds ...*cobra.Command) {
	for i, _ := range cmds {
		dmCmd.AddCommand(cmds[i])
	}
}
